Skip to content

Add Cosmos3 action generation support#13823

Open
yzhautouskay wants to merge 27 commits into
huggingface:mainfrom
yzhautouskay:cosmos3/action-generation
Open

Add Cosmos3 action generation support#13823
yzhautouskay wants to merge 27 commits into
huggingface:mainfrom
yzhautouskay:cosmos3/action-generation

Conversation

@yzhautouskay
Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@github-actions github-actions Bot added size/L PR with diff > 200 LOC models pipelines examples and removed size/L PR with diff > 200 LOC labels May 28, 2026
@github-actions github-actions Bot added the size/L PR with diff > 200 LOC label May 28, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 28, 2026
Comment thread src/diffusers/models/transformers/transformer_cosmos3.py Outdated
Comment thread src/diffusers/models/transformers/transformer_cosmos3.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Copy link
Copy Markdown
Collaborator

@dg845 dg845 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Left some initial comments :).

@github-actions github-actions Bot added the utils label Jun 1, 2026
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I left some feedbacks

Comment thread src/diffusers/models/transformers/transformer_cosmos3.py Outdated
Comment thread src/diffusers/models/transformers/transformer_cosmos3.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
resolution (no upscaling), wastes compute on padding, and is a train/inference mismatch that can hurt
quality.
raw_action_dim (`int`, *optional*):
Number of meaningful (unpadded) action channels to keep when slicing predicted actions. Required for
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the value fixed for each domain_name?
if not, how should a user configure it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can indeed map raw_action_dim from domain_name for nearly all domains, so I've added that table and dropped the required arg in commit. Two domains depend on dataset config instead, resulting in different raw_action_dim values: e.g. for libero width changes with the rotation representation (axis-angle 3D / 6D / 9D -> 7/10/13 total, will follow up on support for libero and hand_pose.

Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py
Comment thread src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples models pipelines size/L PR with diff > 200 LOC utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants